from sqlalchemy import Column, Integer, String, func, DateTime, JSON, Boolean, ForeignKey
from sqlalchemy.orm import relationship

from models import Base


class MailSender(Base):
    """Mail表"""
    id = Column(Integer, primary_key=True, index=True, autoincrement=True)
    name = Column(String(50), comment='发件人邮箱')
    password = Column(String(50), comment='邮箱授权码')
    create_name = Column(String(20), nullable=False, comment='创建者')
    update_name = Column(String(20), comment='最后更新人')

    project_id = Column(Integer, ForeignKey('project.id', ondelete='CASCADE'), comment='项目ID')

